#include <bits/stdc++.h>
using namespace std;

class Solution
{
public:
    int main()
    {
        int n;
        cin >> n;
        vector<int> fishCutes(n);
        for (int i = 0; i < n; ++i)
        {
            cin >> fishCutes[i];
        }
        for (int i = 0; i < n; ++i)
        {
            int lessCuteCount = 0;
            for (int j = 0; j < i; ++j)
            {
                if (fishCutes[i] > fishCutes[j])
                {
                    ++lessCuteCount;
                }
            }
            cout << lessCuteCount << " ";
        }
        return 0;
    }
};

#ifndef __LOCAL_TEST__
int main()
{
    return Solution().main();
}
#endif